package com.briup.smartcity_group6.web.controller;


import com.briup.smartcity_group6.bean.basic.BaseLog;
import com.briup.smartcity_group6.exception.ServiceException;
import com.briup.smartcity_group6.service.IBaseLogService;
import com.briup.smartcity_group6.utils.Result;
import com.briup.smartcity_group6.utils.ResultUtil;
import com.github.pagehelper.PageInfo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
@Api(tags = "日志信息")
@RestController
public class LogController {
    @Autowired
    private IBaseLogService service;

    @ApiOperation("分页查询日志信息")
    @GetMapping("/auth/log/page")
    public Result pageQuery(int pageNum, int pageSize)throws ServiceException {
        PageInfo<BaseLog> pageInfo= service.pageQuery(pageNum, pageSize);
        return ResultUtil.success(pageInfo);
    }
}
